package com.jn.exam.webSocket.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

/**
 * @author 江南大学1033190417
 * @date 2022/3/4 19:14
 */
@Component
public class WebSocketConfig {

    /*
       自动注册使用@ServerEndpoint注解申明的webSocket,endpoint
     */
    @Bean
    public ServerEndpointExporter serverEndpointExporter(){
        return new ServerEndpointExporter();
    }
}
